package cn.itcast;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

import sun.misc.BASE64Encoder;

public class Demo {
	public static void main(String[] args) throws NoSuchAlgorithmException {
		
		String token = "kudshfkshdsfsdfsddfdfdfdfdfs";
		
		MessageDigest md = MessageDigest.getInstance("md5");
		byte md5[] =  md.digest(token.getBytes());  // 0100101001  00101001
		
		BASE64Encoder encoder = new BASE64Encoder();
		
		
		System.out.println(encoder.encode(md5));
		
	}
}
